package com.wind.cqboot.plugin;

import org.springframework.stereotype.Component;

import net.lz1998.cq.event.request.CQGroupRequestEvent;
import net.lz1998.cq.robot.CQPlugin;
import net.lz1998.cq.robot.CoolQ;

/**
 * <p>File：GroupManagePlugin.java</p>
 * <p>Title: 群管理</p>
 * <p>Description: 加群自动同意等功能</p>
 * <p>Copyright: Copyright (c) 2020 2020年3月24日 下午2:45:49</p>
 * <p>Company: zmrit.com </p>
 * @author zmr
 * @version 1.0
 */
@Component
public class GroupManagePlugin extends CQPlugin
{
    @Override
    public int onGroupRequest(CoolQ cq, CQGroupRequestEvent event)
    {
        String flag = event.getFlag();
        String subType = event.getSubType();
        cq.setGroupAddRequest(flag, subType, true, null);
        return MESSAGE_BLOCK;
    }
}
